package core.types;

public class ArrayType implements Type {
	
	private Type type;
	
	public ArrayType(Type type) {
		this.type = type;
	}
	
	public Type getType() {
		return type;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof ArrayType)) {
			return false;
		}
		
		ArrayType other = (ArrayType) obj;
		
		return this.type.equals(other.type);
	}
	
	@Override
	public String toString() {
		return "ARRAY[m,n] OF " + type.toString();
	}

}
